<?php

declare(strict_types=1);

namespace App\Request;

use Hyperf\Validation\Request\FormRequest;

class StoreUserPaperRequest extends FormRequest
{
    /**
     * Determine if the user is authorized to make this request.
     */
    public function authorize(): bool
    {
        return true;
    }

    /**
     * Get the validation rules that apply to the request.
     */
    public function rules(): array
    {
        return [
            'district_id' => 'required',
            'id' => 'required',
            'street_id' => 'required',
            'community_id' => 'required',
//            'build_no' => 'required',
//            'unit_no' => 'required',
//            'house_no' => 'required',
            'questions'=>'required'
        ];
    }

    public function attributes(): array
    {
        return [
            'district_id' => '区县id',
            'id' => '问卷id',
            'street_id' => '街道id',
            'community_id' => '社区id',
//            'build_no' => '楼号',
//            'unit_no' => '单元号',
//            'house_no' => '房间号',
            'questions' => '答卷内容'
        ];
    }
}
